﻿@model WebVideo.Areas.Admin.Models.BusinessModel
@{
    ViewBag.Title = "View";
    Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
}
<script src="@Url.Content("~/Content/cssAdmin/js/plugins/jquery-1.7.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Content/cssAdmin/js/plugins/jquery-ui-1.8.16.custom.min.js")" type="text/javascript"></script>
<div class="maincontentinner">
    <ul class="maintabmenu">
        <li class="current"><a href="@Url.Action("Index", "Business")" >Index</a></li>
         <li class="current"><a href="@Url.Action("Edit", "Business")" >Index</a></li>
    </ul>
    <div class="contenttitle">
    <h2 class="form"><span>Infomation</span></h2>
    </div>

    @using (Html.BeginForm("Edit", "User",
            new { ReturnUrl = ViewBag.ReturnUrl },
            FormMethod.Post, new { @class = "stdform stdform2" }))
    {
        <p>
            <label>Username</label>
            <span class="field">
                @Html.DisplayFor(model => model.UserName)
        
            </span>
        </p>
        <p>
            <label>Họ Tên</label>
            <span class="field">
                @Html.DisplayFor(model => model.CompanyName)

            </span>
        </p>
          <p>
            <label>Email </label>
            <span class="field">
                @Html.DisplayFor(model => model.Email)
    
            </span>
        </p>
         <p>
            <label>Hình Avatar</label>
            <span class="field">
                @{
                    var imageFile = "~/Content/Images/Avatar/";
                    if (@Model.Avatar != null)
                    {
                        imageFile += @Model.Avatar;
                    }
                    else
                    {
                        imageFile += "no-photo.jpg";
                    }
                            }
                <img src="@Url.Content(@imageFile)" alt="" style="height:100px; width:100px" />
            </span>
        </p>
         <p>
            <label>Địa chỉ </label>
            <span class="field">
                @Html.DisplayFor(model => model.Address)
    
            </span>
        </p>
         <p>
            <label>Số điện thoại </label>
            <span class="field">
                @Html.DisplayFor(model => model.PhoneNumber)
    
            </span>
        </p>
         <p>
            <label>Fax </label>
            <span class="field">
                @Html.DisplayFor(model => model.Fax)
    
            </span>
        </p>
        <p>
            <label>Trạng Thái</label>
            @{
        if (@Html.DisplayFor(model => model.Status).ToString() == "1")
        {
                <span class="field">Đang hoạt động</span>
        }
        else
        {
                <span class="field" style="color:red;">Đã bị BAN</span>
        }   
            }
            </p>
         <div class="contenttitle">
    <h2 class="form"><span>List Video For Business</span></h2>
    </div>
       <table border="0" class="stdtable" id="dyntable">
        <colgroup>
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
        </colgroup>
        <thead>
            <tr>
                <th class="head0">Id</th>
                <th class="head1">Tên</th>
                <th class="head1">Loại Video</th>
                <th class="head0">Lượt xem</th>
                <th class="head1">Lượt đã xem</th>
                 <th class="head0">Ngày hết lượt xem</th>
                <th class="head1">Tiêu chí</th>            
               <th class="head0">Tên công ty</th>
                <th class="head1"></th>
     
            </tr>
        </thead>
        <tfoot>
            <tr>
              <th class="head0">Id</th>
                <th class="head1">Tên</th>
                <th class="head1">Loại Video</th>
                <th class="head0">Lượt xem</th>
                <th class="head1">Lượt đã xem</th>
                 <th class="head0">Ngày hết lượt xem</th>
                <th class="head1">Tiêu chí</th>            
               <th class="head0">Tên công ty</th>
                <th class="head1"></th>

            </tr>
        </tfoot>
        <tbody>     
          @{
         foreach (var item in Model.DSVideo)
         {
              <tr class="gradeX">
                    <td>
                        @Html.DisplayFor(modelitem => item.Id)
                    </td>
                    <td>
                        @Html.DisplayFor(modelitem => item.Name)
                    </td>
                    <td>
                        @Html.DisplayFor(modelitem => item.EntityTypeVideo.Name )
                    </td>
                    <td>
                        @Html.DisplayFor(modelitem => item.Views )
                    </td>
                    <td>
                        @Html.DisplayFor(modelitem => item.Viewed )
                    </td>

                    <td>
                        @Html.DisplayFor(modelitem => item.Viewed_Date  )
                    </td>
                    <td>
                        @Html.DisplayFor(modelitem => item.Criteria )
                    </td>
                    <td>
                        @Html.DisplayFor(modelitem => item.EntityBusiness.CompanyName  )
                    </td>
                  <td class ="eddelete">
                        @Html.ActionLink(" ", "View","Video", new { IdVideo = @item.Id }, new { @class = "view",title="View" })
                  </td>
                  </tr>
                

     }
    }
            </tbody>
          
      </table>
         <p class="stdformbutton">
            <input type="submit" value="Quay lại" onclick="javascript: history.back(); return false" />
        </p> 
    }
             

</div>
<!--maincontentinner-->

